const emailReg = /^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/

export default {

    /**
     * 检查字符串是否为空/undefined/null
     * @param s  字符串
     * @returns boolean
     */
    isEmpty(s) {
        if (s === undefined || s === null) {
            return true;
        }
        s = s.replaceAll(" ", "");
        return s === '';
    },
    /**
     * 检查邮箱格式是否符合
     * @param {*} e 邮箱
     * @returns boolean
     */
    checkEmail(e) {
        return emailReg.test(e);
    }


}